#ifndef __ANET_H
#define __ANET_H

#include <sys/types.h>

#define ANET_OK 0
#define ANET_ERR -1
#define ANET_ERR_LEN 256

int anetTcpAccept(char *err, int serversock, char *ip, size_t ip_len, int *port);
int anetSetBlock(char *err, int fd, int non_block);
int anetNonBlock(char *err, int fd);
int anetCloexec(int fd);
int anetTcpServer(int port, char *bindaddr, int backlog);
int anetEnableTcpNoDelay(char *err, int fd);
int anetDisableTcpNoDelay(char *err, int fd);
int anetTcpKeepAlive(char *err, int fd);

#endif